# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=perl-cgi-formbuilder
pkgver=3.10
pkgrel=6
pkgdesc="Easily generate and process stateful forms"
arch=('any')
license=('PerlArtistic')
url="https://metacpan.org/release/CGI-FormBuilder"
depends=('perl')
makedepends=('perl-html-template' 'perl-text-template' 'perl-template-toolkit' 'perl-cgi-session')
checkdepends=('perl-cgi')
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/B/BI/BIGPRESH/CGI-FormBuilder-$pkgver.tar.gz")
sha512sums=('38d8e6eb729e188074d872b979ad46133152877bb30b95329a2c7275154646a4afb62dc3539cb34781149f424b1d384d05230efe8b174967742625a81765bad5')

build() {
  cd CGI-FormBuilder-$pkgver
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd CGI-FormBuilder-$pkgver
  make test
}

package() {
  cd CGI-FormBuilder-$pkgver
  make DESTDIR="$pkgdir" install
}
